﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLTTTH.UI
{
    public partial class frmPanel : Form
    {

        frmMain main;

        public frmPanel()
        {
            InitializeComponent();

        }

        public frmPanel(frmMain main,int index)
        {
            InitializeComponent();
            this.main = main;
            switch (index)
            { 
                case 1:
                    UcNhanVien nhanVien = new UcNhanVien();
                    nhanVien.Dock = DockStyle.Fill;
                    panel1.Controls.Add(nhanVien);
                    this.Text = "Nhân Viên";
                    break;
                case 2:
                    UcKhachHang khachHang = new UcKhachHang();
                    khachHang.Dock = DockStyle.Fill;
                    panel1.Controls.Add(khachHang);
                    this.Text = "Khách Hàng";
                    break;
                case 3:
                    UserControlUI.UcPhieuNhap phieuNhap = new QLTTTH.UI.UserControlUI.UcPhieuNhap();
                    phieuNhap.Dock = DockStyle.Fill;
                    panel1.Controls.Add(phieuNhap);
                    this.Text = "Phiếu Nhập";
                    break;
                case 4:
                    UserControlUI.UcPhieuXuat phieuXuat = new QLTTTH.UI.UserControlUI.UcPhieuXuat();
                    phieuXuat.Dock = DockStyle.Fill;
                    panel1.Controls.Add(phieuXuat);
                    this.Text = "Phiếu Xuất";
                    break;
                case 5:
                    UserControlUI.UcPhatO nhaCungCap = new QLTTTH.UI.UserControlUI.UcPhatO();
                    nhaCungCap.Dock = DockStyle.Fill;
                    panel1.Controls.Add(nhaCungCap);
                    this.Text = "Nhà Cung Cấp";
                    break;
                case 6:
                    UserControlUI.UcKenh account = new QLTTTH.UI.UserControlUI.UcKenh();
                    account.Dock = DockStyle.Fill;
                    panel1.Controls.Add(account);
                    this.Text = "Account";
                    break;
                case 7:
                    UserControlUI.UcMatHang matHang = new QLTTTH.UI.UserControlUI.UcMatHang();
                    matHang.Dock = DockStyle.Fill;
                    panel1.Controls.Add(matHang);
                    this.Text = "Mặt Hàng";
                    break;
                case 8:
                    UserControlUI.UcPhatTren kho = new QLTTTH.UI.UserControlUI.UcPhatTren();
                    kho.Dock = DockStyle.Fill;
                    panel1.Controls.Add(kho);
                    this.Text = "Nhà Cung Cấp";
                    break;
            }
        }

        private void frmPanel_Load(object sender, EventArgs e)
        {

        }

    }
}
